package com.alibaba.citrus.cr.b2b.trade.order.repository;

import com.alibaba.citrus.cr.b2b.trade.order.repository.request.UpdateFeaturesReq;
import com.epoch.app.crb2btradecenter.domain.orderline.dto.UpdateCumulativeNoticeQuantityAndFeaturesRequest;
import com.epoch.app.crb2btradecenter.domain.orderline.dto.UpdateCumulativeNoticeQuantityAndFeaturesResponse;
import com.epoch.app.crb2btradecenter.sdo.OrderLineSDO;

import java.util.List;

public interface OrderLineWriteRepository {

    String batchCreateOrderLine(OrderLineSDO orderLineSDO);

    Boolean modifyOrderLine(OrderLineSDO orderLineSDO);

    Boolean batchUpdateOrderLine(String orderId,Integer status);

    /**
     * 移除销售子订单
     * @param orderLineSDO
     * @return
     */
    String remove(OrderLineSDO orderLineSDO);


    /**
     * 修改销售子订单
     * @param orderLineSDO
     */
    Boolean modify(OrderLineSDO orderLineSDO);

    /**
     * 保存销售子订单
     * @param orderLineSDO
     * @return String
     */
    String save(OrderLineSDO orderLineSDO);

    /**
     * 批量修改子订单状态
     * @param orderLineSDO
     * @return
     */
    Boolean modifyStatus(OrderLineSDO orderLineSDO);

    /**
     * 批量修改子订单状态
     * @param orderLineSDOList
     * @return
     */
    Boolean batchModifyStatus(List<OrderLineSDO> orderLineSDOList);

    /**
     * 批量取消 根据主单信息整体取消，优化按子单一条条取消
     * @return
     */
    Boolean batchCancel(String modifierCode, String modifierName, String refuseReason, List<String> mainOrderBizIds);

    Boolean modifyModifier(OrderLineSDO orderSDO);

    Boolean updateFeatures(UpdateFeaturesReq featuresUpdateRequest);

    Boolean modifyStatusForVersion(OrderLineSDO orderLineSDO);

    /**
     * 更新累计通知数量和features
     * @param updateCumulativeNoticeQuantityAndFeaturesRequest 入参
     * @return
     */
    UpdateCumulativeNoticeQuantityAndFeaturesResponse updateCumulativeNoticeQuantityAndFeatures(UpdateCumulativeNoticeQuantityAndFeaturesRequest updateCumulativeNoticeQuantityAndFeaturesRequest);

}
